<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<link rel="icon"
	href="<c:url value="/resources/img/bitbug_favicon.ico" />"
	type="image/x-icon">
<link rel="shortcut icon"
	href="<c:url value="/resources/img/bitbug_favicon.ico" />"
	type="image/x-icon">

<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/normalize.css" />">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/demo.css" />">

<!--必要样式-->
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/component.css" />">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<title><c:out value="${title}" /></title>
</head>
<body>
	<!-- 导航 begin -->
	<nav class="navbar navbar-inverse" style="margin-bottom:0">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#navbar" aria-expanded="false"
				aria-controls="navbar">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="#">Book System</a>
		</div>
		<div id="navbar" class="collapse navbar-collapse">
			<ul class="nav navbar-nav">
				<li class="active"><a href="#">Home</a></li>
				<li><a href="#about">About</a></li>
				<li><a href="#contact">Contact</a></li>
			</ul>

			<ul class="nav navbar-nav navbar-right">
				<li><a href="user/registerPage">Register</a></li>
				<c:choose>

					<c:when test="${sessionScope.userinfo==null}">
						<li><a href="user/loginPage">Login</a></li>
					</c:when>

					<c:otherwise>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown" role="button" aria-haspopup="true"
							aria-expanded="false">${sessionScope.userinfo.username} <span class="caret"></span></a>
							<ul class="dropdown-menu">
								<li><a href="#">record</a></li>
								<li><a href="user/changePasswordPage">help</a></li>
								<li role="separator" class="divider"></li>
								<li><a href="#">Settings</a></li>
								<li><a href="user/signOut">Sign out</a></li>
							</ul></li>
					</c:otherwise>

				</c:choose>

			</ul>

		</div>

	</div>
	</nav>
	<!-- 导航 end -->